package cn.com.xjnt.vas.manage.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.frameworks.core.repository.BaseRepository;
import com.frameworks.core.service.AbstractBaseService;

import cn.com.xjnt.vas.manage.domain.entity.AccountRole;
import cn.com.xjnt.vas.manage.repository.AccountRoleRepository;
import cn.com.xjnt.vas.manage.service.AccountRoleService;

@Service
@Transactional
public class AccountRoleServiceImpl extends AbstractBaseService<AccountRole, Long> implements AccountRoleService {

	@Autowired
	private AccountRoleRepository accountRoleRepository;
	
	@Override
	public void save(AccountRole entity) {
		super.saveOrUpdate(entity);
	}

	@Override
	public void update(AccountRole entity) {
		super.saveOrUpdate(entity);
	}

	@Override
	public List<AccountRole> findByAccountId(Long accountId) {
		return accountRoleRepository.findByAccountId(accountId);
	}

	@Override
	protected BaseRepository<AccountRole, Long> getBaseRepository() {
		return accountRoleRepository;
	}

}
